<template>
    <h1>我是APP组件 --- {{ this.msg }} </h1>

    <child1 name="msg" :text="msg" @setMsg="setMsg" />
</template>

<script>
import child1 from './components/child1.vue';

export default {
    data() {
        return {
            msg: "在 data 中的普通字符串",
        }
    },
    methods: {
        setMsg(newMsg) {
            this.msg2 = newMsg;
        },
    },
    components: {
        child1,
    },
};
</script>

<style></style>
